package com.itcast.parser;

import java.util.List;

import org.json.JSONException;
import org.json.JSONObject;

import com.alibaba.fastjson.JSON;
import com.itcast.vo.Order;

public class OrderParser extends BaseParser<List<Order>> {

	@Override
	public List<Order> parseJSON(String paramString) throws JSONException {
		if (checkResponse(paramString) == null) {
			return null;
		} else {
			JSONObject jsonObject = new JSONObject(paramString);
			String order1 = jsonObject.getString("orderlist");
			List<Order> orderlist = JSON.parseArray(order1, Order.class);
			return orderlist;

		}
	}

}
